#ifndef __DICTPRODUCER_H__
#define __DICTPRODUCER_H__
#include"DictProducer.h"
#include"SplitEnglish.h"
#include"SplitToolCppJieba.h"
#include<vector>
#include<string>
#include<map>
#include<set>

using std::vector;
using std::string;
using std::pair;
using std::set;
using std::map;

class SplitTool;

class DictProducer{
private:
    vector<string> _files;
    vector<pair<string,int>> _dict;
    map<string,set<int>> _index;
    SplitTool *_cuttor;
    Configuration *_conf;
    bool _flag;
public:
    DictProducer(const string & path);
    DictProducer(const string &dir,SplitTool *tools);
    ~DictProducer();
    void buildEnDict();
    void buildCnDict();

    void storeDict(const char *filePath);
    
    void showFiles()const;
    void showDict()const;
    
    //获取文件绝对路径
    void createIndex();
    void storeIndex(const char *filePath);
};

#endif